<table>
  <tr>
    <td>
      <%= button_to "Registrera", :action => "finish" %>
    </td>
  </tr>
  <tr>
    <td>

    </td>
  </tr>
  <tr>
    <td>
      <font class="regulartext">
        All information som behövs om annonsen är nu inmatad. Kolla igenom uppgifterna nedan och klicka på registrera om du är nöjd. Annonsen blir då synlig för köpare.
      </font>
      <br/>
      <table>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Rubrik:
          </td>
          <td class="regulartext" style="text-align: left;">
            <%=session[:ad].title%>
          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Beskrivning:
          </td>
          <td class="regulartext" style="text-align: left;">
            <%=decode_string(session[:ad].description)%>
          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Bilder:
          </td>
          <td class="regulartext" style="text-align: left;">
            <%= render_table(:entities => @images_included,
              :width_area => 600,
              :width_entity => 150,
              :partial => "preview_image") %>

          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Kategorier:
          </td>
          <td class="regulartext" style="text-align: left;">
            <% @categories_selected.each do |category| %>
              <%= category_path(category,false,false) %><br/>
            <% end %>
          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Annonstyp:
          </td>
          <td class="regulartext" style="text-align: left;">
            <%= session[:ad_type].title %><br/>
            <% if (@ad_type_name == "auction_traditional") %>
              <%= render :partial => "preview_auction" %>
            <% elsif (@ad_type_name == "auction_dynamic") %>
              <%= render :partial => "preview_auction" %>
              <%= render :partial => "preview_dynamic" %>
            <% elsif (@ad_type_name == "fixed_traditional") %>
              <%= render :partial => "preview_fixed" %>
            <% elsif (@ad_type_name == "fixed_auction_traditional") %>
              <%= render :partial => "preview_fixed" %>
              <%= render :partial => "preview_auction" %>
            <% elsif (@ad_type_name == "fixed_auction_dynamic") %>
              <%= render :partial => "preview_fixed" %>
              <%= render :partial => "preview_auction" %>
              <%= render :partial => "preview_dynamic" %>
            <% elsif (@ad_type_name == "fixed_relaxed") %>
              <%= render :partial => "preview_relaxed" %>
            <% end %>
          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Betalningsalternativ:
          </td>
          <td class="regulartext" style="text-align: left;">
            <% @payment_methods_selected.each do |p| %>
              <li>
                <%= p.name %>
              </li>
            <% end %>
          </td>
        </tr>
        <tr>
          <td class="regulartext" style="text-align: right;">
            Leveransalternativ:
          </td>
          <td class="regulartext" style="text-align: left;">
            <% @shipping_method_areas_selected.each_with_index do |method,index| %>
              <li>
                <%= method.price %> kr
                med <%= method.shipping_method.name %>
                inom <%= method.shipping_area.name %>
              </li>
            <% end %>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <%= button_to "Registrera", :action => "finish" %>
    </td>
  </tr>
</table>
